package com.wkb.design.createModing.prototype.factory.impl;

import java.util.ArrayList;

import com.wkb.design.createModing.prototype.factory.ILifeFactory;
import com.wkb.design.createModing.prototype.pojo.DayLife;

/**  
 * @author wkb 
 * @version 创建时间：2013-6-14 上午11:25:21  
 * 类说明
 */
public class LifeFactoryImpl implements ILifeFactory {

	private static DayLife dayLife = null;
	
	private void initObject(){
		
		if(dayLife == null){
			dayLife = new DayLife();
			dayLife.setGetUp("  7:00起床      ");
			dayLife.setByBus(1);
			dayLife.setGetFood("   7:45买早点        ");
			dayLife.setNoon("   11:00中午小休息一下        ");
			dayLife.setAfternoonWork("    13:30下午开始工作         ");
			dayLife.setGoHome("    17:30下班回家             ");
			dayLife.setNight("     20:00上床休息         ");
			ArrayList<String> str = new ArrayList<String>();
			str.add("新");
			str.add("新");
			str.add("新");
			str.add("新");
			dayLife.setOpenTv(str);
		}
		
	}
	
	public DayLife getDayLifeInstance() {
		/**
		 *@version 创建时间：2013-6-14 上午11:25:21
		 *@author wkb
		 */

		this.initObject();
		return dayLife.clone();
		
	}

	public DayLife getDayLifeInstByIo() {
		/**
		*@version 创建时间：2013-6-14 下午2:36:54
		*@author wkb
		*/
		this.initObject();
		
		return dayLife.ioDeepClone();
	}

}
